package com.station.search.controller;

import com.station.search.common.domain.WebResponse;
import com.station.search.common.domain.WebResponseBuilder;
import com.station.search.common.exception.BasicException;
import com.station.search.service.StationLevelService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author: JT
 * @date: 2021/8/24
 * @Title:  台站级别 Web处理器
 */
@RestController
@RequestMapping
public class StationLevelController {

    @Resource
    private StationLevelService stationLevelService;

    /**
     * 台站级别列表
     * @return
     */
    @GetMapping("/station/levels")
    public WebResponse stationLevels() {
        return WebResponseBuilder.ok()
                .setMsg("台站级别列表")
                .setData(stationLevelService.list());
    }

}
